package com.immortal.core.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.security.web.authentication.session.SessionFixationProtectionEvent;
import org.springframework.stereotype.Component;

/**
 * <p>TODO
 *
 * @author wind
 * @version 1.0
 * @since 2018/12/20
 */
@Component
@Slf4j
class SessionFixationProtectionEventListener implements ApplicationListener<SessionFixationProtectionEvent> {
    @Override
    public void onApplicationEvent(SessionFixationProtectionEvent event) {
        String oldSessionId = event.getOldSessionId();
        String newSessionId = event.getNewSessionId();
        log.info("oldSessionId:{} =>newSessionId:{} ", oldSessionId, newSessionId);
    }
}
